package com.kk.xhr.admin.controller.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 登录request
 *
 * @author luokexiong
 * @version 1.0 2021/2/18
 * @since 1.0.0
 */
@ApiModel
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class UserLoginRequest {
    /** 用户id */
    @ApiModelProperty(value = "用户名", example = "10010001", notes = "用户名和工号一致，规定为数字")
    @Length(min = 6, max = 10)
    @Pattern(regexp = "[0-9]*")
    private String username;
    /** 调薪日期 */
    @ApiModelProperty(value = "密码", example = "*******")
    @NotBlank
    @Length(min = 6, max = 20)
    private String password;
}
